package com.zyk.leetcode;

import java.util.Arrays;

/**
 * @author zhangsan
 * @date 2021/4/4 16:55
 */
public class J17 {

    public static int[] printNumbers(int n) {
        int nums = (int)Math.pow(10, n) - 1;
        int[] ans = new int[nums];
        for (int i = 1; i <= nums; i++) {
            ans[i-1] = i;
        }
        return ans;
    }

    // for test
    public static void main(String[] args) {
        int n = 3;
        int[] ans = printNumbers(n);
        System.out.println(Arrays.toString(ans));
    }

}
